﻿using Company.Database.Base.Repositories;
using Company.Database.SqlServer.Repositories;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Company.Database.SqlServer
{
    /// <summary>
    /// 注册每张表的增删改查操作类
    /// </summary>
    public static class RepositoryRegistor
    {
        public static void Registor(IServiceCollection services)
        {
            services.AddScoped<IUserRepository, UserRepository>();
            services.AddScoped<IHospitalRepository, HospitalRepository>();
            services.AddScoped<IStationRepository, StationRepository>();
            services.AddScoped<IDeviceRepository, DeviceRepository>();

            services.AddScoped<ISourceRepository, SourceRepository>();
            services.AddScoped<IHL7MSHRepository, HL7MSHRepository>();
            services.AddScoped<IHL7OBRRepository, HL7OBRRepository>();
            services.AddScoped<IHL7OBXRepository, HL7OBXRepository>();
            services.AddScoped<IHL7PIDRepository, HL7PIDRepository>();
        }
    }
}
